package com.sxhalo.fsms.service.impl;

import com.sxhalo.fsms.domain.*;
import com.sxhalo.fsms.mapper.DeviceEmRunningDataMapper;

import com.sxhalo.fsms.mapper.FactDeviceMapper;
import com.sxhalo.fsms.service.IDeviceEmRunningDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class DeviceEmRunningDataServiceImpl implements IDeviceEmRunningDataService {

	@Autowired
	private DeviceEmRunningDataMapper mapper;

	@Override
	public Integer insertSelective(DeviceEmRunningData record) {
		return null;
	}

	@Override
	public Integer updateByPrimaryKeySelective(DeviceEmRunningData record) {
		return null;
	}

	@Override
	public Integer deleteByPrimaryKey(Object key) {
		return null;
	}

	@Override
	public DeviceEmRunningData selectByPrimaryKey(Object key) {
		return null;
	}

	@Override
	public List<DeviceEmRunningData> findWhereList(String where, String order) {
		return mapper.findWhereList(where, order);
	}

	@Override
	public Integer getCount(String where) {
		return mapper.getCount(where);
	}

	@Override
	public List<DeviceEmRunningData> findPagerList(Integer start, Integer length, String where, String order) {
		return mapper.findPagerList(start, length, where, order);
	}



	@Override
	public Integer foreachInsert(List<RedisData> list) {
		if(list.size()==0){
			return null;
		}
		return mapper.batchInsert(list);
	}

	@Override
	public List<HashMap> findAttrHis(String attr, String where) {
		return mapper.findAttrHis(attr,where);
	}

	@Override
	public List<Map<String, Object>> getEnergyPhaseHis(String where) {
		return mapper.getEnergyPhaseHis(where);
	}

	@Override
	public List<Map<String, Object>> getEnergyReport(List<FactArea> areaList, String where, String where1, String type) {
		return mapper.getEnergyReport(areaList,where,  where1,  type);
	}
	@Override
	public List<Map<String, Object>> getEnergyReport1(List<FactDevice> deviceList, String where, String where1, String type) {
		return mapper.getEnergyReport1(deviceList,where,  where1,  type);
	}

	@Override
	public Map<String, Object> getLastData(List<FactArea> areaList, String where) {
		return mapper.getLastData(areaList,where);
	}

	@Override
	public Map<String, Object> getLastData1(List<FactDevice> deviceList, String where) {
		return mapper.getLastData1(deviceList,where);
	}

	@Override
	public List<Map<String, Object>> getUnitEnergyReport(String where, String where1) {
		return mapper.getUnitEnergyReport(where,where1);
	}

}
